import React from 'react';
import Header from '../components/header';
import Footer from '../components/footer';
import CustomButton from "../components/custombutton";
import '../less/updatefile.less';
import UpdateFileExtend from '../components/updatefile.extend.js';

export default class UpdateFile extends React.Component{
	constructor(props){
		super(props);
		this.state={
			fileName: '',
			fileSize: 0,
			pageType: true,
			title: "Update",
			isLogin: false,
			error:0,
			progress:0,
			couponVal:0,
			isShowProgress: true,
			filetype:"video/mp4",
			filesize:100
		}
	}
	handleStateChange(state){
		this.setState(state)
	}
	fileReadStart(){
		console.log(arguments)
	}
	fileReaded(){
		console.log(arguments)
	}
	fileReadProgress(){
		console.log(arguments)
	}
	fileReadError(){
		console.log(arguments)
	}
	fileUpdateState(){
		console.log(arguments)
	}
	fileUpdateProgress(){
		console.log(arguments)
	}
	fileUpdated(){
		console.log(arguments)
	}
	fileUpdateError(){
		console.log(arguments)
	}
	componentDidMount(){

	}
	render(){
		return (
			<div className="update_file">
				<Header pageType={this.state.pageType} title={this.state.title} isLogin={this.state.isLogin}/>
				<div className="update_file_input">
					<UpdateFileExtend 
						isShowProgress={this.state.isShowProgress} 
						filetype={this.state.filetype} 
						filesize={this.state.filesize} 
						onFileReadStart={this.fileReadStart.bind(this)} 
						onFileReaded={this.fileReaded.bind(this)} 
						onFileReadProgress={this.fileReadProgress.bind(this)} 
						onFileReadError={this.fileReadError.bind(this)} 
						onFileUpdateStart={this.fileUpdateState.bind(this)} 
						onFileUpdateProgress={this.fileUpdateProgress.bind(this)} 
						onFileUpdated={this.fileUpdated.bind(this)} 
						onFileUpdateError={this.fileUpdateError.bind(this)}>
						Update Video File
					</UpdateFileExtend>
				</div>
				<Footer />
			</div>
		)
	}
}